{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import plotly as py \n",
    "import plotly.graph_objs as go \n",
    "import plotly.express as px \n",
    "from plotly import tools"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "path=r'C:\\Users\\Administrator\\Desktop\\qimo\\pandas\\新建文件夹\\global-carbon-dioxide-emissions-by-sector.xlsx'\n",
    "df = pd.read_excel(path)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>国家</th>\n",
       "      <th>Code</th>\n",
       "      <th>年份</th>\n",
       "      <th>交通</th>\n",
       "      <th>林业</th>\n",
       "      <th>能源</th>\n",
       "      <th>其他来源</th>\n",
       "      <th>农业、土地利用和林业</th>\n",
       "      <th>垃圾</th>\n",
       "      <th>住宅的和商业的</th>\n",
       "      <th>工业</th>\n",
       "      <th>农业</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1990</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>918414.8</td>\n",
       "      <td>118810.1</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1991</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>0.0</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>690875.1</td>\n",
       "      <td>129749.1</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1992</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373454.6</td>\n",
       "      <td>141625.6</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1993</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>325806.2</td>\n",
       "      <td>124728.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1994</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>0.0</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>265081.3</td>\n",
       "      <td>147071.6</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5435</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>ZWE</td>\n",
       "      <td>2006</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>-82220.5</td>\n",
       "      <td>7739700.0</td>\n",
       "      <td>0</td>\n",
       "      <td>37627000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1420000.0</td>\n",
       "      <td>628730.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5436</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>ZWE</td>\n",
       "      <td>2007</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>-83808.4</td>\n",
       "      <td>7273200.0</td>\n",
       "      <td>0</td>\n",
       "      <td>37627000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1360000.0</td>\n",
       "      <td>541400.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5437</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>ZWE</td>\n",
       "      <td>2008</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>-85458.8</td>\n",
       "      <td>7850200.0</td>\n",
       "      <td>0</td>\n",
       "      <td>37627000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1300000.0</td>\n",
       "      <td>510070.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5438</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>ZWE</td>\n",
       "      <td>2009</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>-87175.6</td>\n",
       "      <td>8269300.0</td>\n",
       "      <td>0</td>\n",
       "      <td>37627000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1350000.0</td>\n",
       "      <td>478730.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5439</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>ZWE</td>\n",
       "      <td>2010</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>-88962.7</td>\n",
       "      <td>9019300.0</td>\n",
       "      <td>0</td>\n",
       "      <td>37627000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1420000.0</td>\n",
       "      <td>471890.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5440 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               国家 Code    年份         交通       林业         能源  其他来源  农业、土地利用和林业  \\\n",
       "0     Afghanistan  AFG  1990   607277.0      0.0   277412.2     0         0.0   \n",
       "1     Afghanistan  AFG  1991   531458.8      0.0   270127.8     0         0.0   \n",
       "2     Afghanistan  AFG  1992   376129.4      0.0   154580.4     0         0.0   \n",
       "3     Afghanistan  AFG  1993   323714.1      0.0   151712.6     0         0.0   \n",
       "4     Afghanistan  AFG  1994   310399.8      0.0   146342.6     0         0.0   \n",
       "...           ...  ...   ...        ...      ...        ...   ...         ...   \n",
       "5435     Zimbabwe  ZWE  2006  1247900.0 -82220.5  7739700.0     0  37627000.0   \n",
       "5436     Zimbabwe  ZWE  2007  1174800.0 -83808.4  7273200.0     0  37627000.0   \n",
       "5437     Zimbabwe  ZWE  2008  1171700.0 -85458.8  7850200.0     0  37627000.0   \n",
       "5438     Zimbabwe  ZWE  2009  1246500.0 -87175.6  8269300.0     0  37627000.0   \n",
       "5439     Zimbabwe  ZWE  2010  1354500.0 -88962.7  9019300.0     0  37627000.0   \n",
       "\n",
       "       垃圾    住宅的和商业的        工业   农业  \n",
       "0     0.0   918414.8  118810.1  0.0  \n",
       "1     0.0   690875.1  129749.1  0.0  \n",
       "2     0.0   373454.6  141625.6  0.0  \n",
       "3     0.0   325806.2  124728.0  0.0  \n",
       "4     0.0   265081.3  147071.6  0.0  \n",
       "...   ...        ...       ...  ...  \n",
       "5435  0.0  1420000.0  628730.0  0.0  \n",
       "5436  0.0  1360000.0  541400.0  0.0  \n",
       "5437  0.0  1300000.0  510070.0  0.0  \n",
       "5438  0.0  1350000.0  478730.0  0.0  \n",
       "5439  0.0  1420000.0  471890.0  0.0  \n",
       "\n",
       "[5440 rows x 12 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 查看数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 5440 entries, 0 to 5439\n",
      "Data columns (total 12 columns):\n",
      " #   Column      Non-Null Count  Dtype  \n",
      "---  ------      --------------  -----  \n",
      " 0   国家          5440 non-null   object \n",
      " 1   Code        4481 non-null   object \n",
      " 2   年份          5440 non-null   int64  \n",
      " 3   交通          5253 non-null   float64\n",
      " 4   林业          5356 non-null   float64\n",
      " 5   能源          5440 non-null   float64\n",
      " 6   其他来源        5440 non-null   int64  \n",
      " 7   农业、土地利用和林业  5419 non-null   float64\n",
      " 8   垃圾          5430 non-null   float64\n",
      " 9   住宅的和商业的     5430 non-null   float64\n",
      " 10  工业          5430 non-null   float64\n",
      " 11  农业          5419 non-null   float64\n",
      "dtypes: float64(8), int64(2), object(2)\n",
      "memory usage: 510.1+ KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>国家</th>\n",
       "      <th>Code</th>\n",
       "      <th>年份</th>\n",
       "      <th>交通</th>\n",
       "      <th>林业</th>\n",
       "      <th>能源</th>\n",
       "      <th>其他来源</th>\n",
       "      <th>农业、土地利用和林业</th>\n",
       "      <th>垃圾</th>\n",
       "      <th>住宅的和商业的</th>\n",
       "      <th>工业</th>\n",
       "      <th>农业</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1990</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>918414.8</td>\n",
       "      <td>118810.1</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1991</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>0.0</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>690875.1</td>\n",
       "      <td>129749.1</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1992</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373454.6</td>\n",
       "      <td>141625.6</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1993</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>325806.2</td>\n",
       "      <td>124728.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>AFG</td>\n",
       "      <td>1994</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>0.0</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>265081.3</td>\n",
       "      <td>147071.6</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            国家 Code    年份        交通   林业        能源  其他来源  农业、土地利用和林业   垃圾  \\\n",
       "0  Afghanistan  AFG  1990  607277.0  0.0  277412.2     0         0.0  0.0   \n",
       "1  Afghanistan  AFG  1991  531458.8  0.0  270127.8     0         0.0  0.0   \n",
       "2  Afghanistan  AFG  1992  376129.4  0.0  154580.4     0         0.0  0.0   \n",
       "3  Afghanistan  AFG  1993  323714.1  0.0  151712.6     0         0.0  0.0   \n",
       "4  Afghanistan  AFG  1994  310399.8  0.0  146342.6     0         0.0  0.0   \n",
       "\n",
       "    住宅的和商业的        工业   农业  \n",
       "0  918414.8  118810.1  0.0  \n",
       "1  690875.1  129749.1  0.0  \n",
       "2  373454.6  141625.6  0.0  \n",
       "3  325806.2  124728.0  0.0  \n",
       "4  265081.3  147071.6  0.0  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据清洗和整理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "21"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df.年份.unique())  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 删除不需要的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_main = df.drop(['Code','其他来源','农业、土地利用和林业','垃圾','农业','林业','住宅的和商业的'],axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>国家</th>\n",
       "      <th>年份</th>\n",
       "      <th>交通</th>\n",
       "      <th>能源</th>\n",
       "      <th>工业</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1990</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>118810.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1991</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>129749.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1992</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>141625.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1993</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>124728.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1994</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>147071.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5435</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>2006</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>7739700.0</td>\n",
       "      <td>628730.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5436</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>2007</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>7273200.0</td>\n",
       "      <td>541400.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5437</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>2008</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>7850200.0</td>\n",
       "      <td>510070.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5438</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>2009</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>8269300.0</td>\n",
       "      <td>478730.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5439</th>\n",
       "      <td>Zimbabwe</td>\n",
       "      <td>2010</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>9019300.0</td>\n",
       "      <td>471890.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5440 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               国家    年份         交通         能源        工业\n",
       "0     Afghanistan  1990   607277.0   277412.2  118810.1\n",
       "1     Afghanistan  1991   531458.8   270127.8  129749.1\n",
       "2     Afghanistan  1992   376129.4   154580.4  141625.6\n",
       "3     Afghanistan  1993   323714.1   151712.6  124728.0\n",
       "4     Afghanistan  1994   310399.8   146342.6  147071.6\n",
       "...           ...   ...        ...        ...       ...\n",
       "5435     Zimbabwe  2006  1247900.0  7739700.0  628730.0\n",
       "5436     Zimbabwe  2007  1174800.0  7273200.0  541400.0\n",
       "5437     Zimbabwe  2008  1171700.0  7850200.0  510070.0\n",
       "5438     Zimbabwe  2009  1246500.0  8269300.0  478730.0\n",
       "5439     Zimbabwe  2010  1354500.0  9019300.0  471890.0\n",
       "\n",
       "[5440 rows x 5 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_main"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 可视化目标——1990年-2011年能源、交通、工业三方面产生CO2的趋势"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 可视化前处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>国家</th>\n",
       "      <th>year</th>\n",
       "      <th>交通</th>\n",
       "      <th>能源</th>\n",
       "      <th>工业</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1990</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>118810.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1991</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>129749.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1992</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>141625.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1993</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>124728.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>1994</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>147071.6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            国家  year        交通        能源        工业\n",
       "0  Afghanistan  1990  607277.0  277412.2  118810.1\n",
       "1  Afghanistan  1991  531458.8  270127.8  129749.1\n",
       "2  Afghanistan  1992  376129.4  154580.4  141625.6\n",
       "3  Afghanistan  1993  323714.1  151712.6  124728.0\n",
       "4  Afghanistan  1994  310399.8  146342.6  147071.6"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bb = df_main.rename(columns={\"年份\": \"year\"})\n",
    "df_bb.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=5440, step=1)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bb.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "numpy.int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df_bb.year[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "#df_bb[\"year\"] = pd.to_datetime(df_bb[\"year\"])\n",
    "#df_bb[\"year\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5652587275.5"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bb['交通'].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1990, 2010)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bb[\"year\"].min(), df_bb[\"year\"].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bb[\"year\"].max() - df_bb[\"year\"].min()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtgAAAERCAYAAABB3NDkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAG7pJREFUeJzt3Xu0ZGV95vHvQzctURTRbgxyaxJxpJdB0BbBK4oQIDPgZNR0j3hFezlKNJPoDK4QQ0AnimO8JHhBRdQVQfDaRhQnBJY3cGiCtDSINMhIC0taxNsiBNHf/LH3keJ4mj6X9+zT5/T3s1atU/XuXfv3Vp2qXU+99dauVBWSJEmS2thhrjsgSZIkLSQGbEmSJKkhA7YkSZLUkAFbkiRJasiALUmSJDVkwJYkSZIaWhABO8lZSW5LcvUk1t07ycVJrkyyPskxQ/RRkiRJ24cFEbCBs4GjJrnuycB5VXUQsAp4z2x1SpIkSdufBRGwq+orwI9H25L8fpIvJbkiyVeTPGZsdeAh/fldgFsG7KokSZIWuMVz3YFZdCbwyqq6PsmT6EaqnwWcAnw5yZ8CDwKePXddlCRJ0kKzIAN2kp2BJwPnJxlrfkD/dzVwdlW9PcmhwMeSPLaqfj0HXZUkSdICsyADNt3Ul59U1YETLDuBfr52VV2aZCdgKXDbgP2TJEnSArUg5mCPV1U/A76X5HkA6TyuX/x94PC+fX9gJ2DznHRUkiRJC06qaq77MGNJzgEOoxuJ/iHw18C/AO8Fdgd2BM6tqlOTrAA+AOxM94XH/1FVX56LfkuSJGnhWRABW5IkSdpWLMgpIpIkSdJcmfdfcly6dGktX758rrshSZKkBe6KK674UVUt29p68z5gL1++nHXr1s11NyRJkrTAJfl/k1nPKSKSJElSQwZsSZIkqSEDtiRJktSQAVuSJElqyIAtSZIkNWTAliRJkhoyYEuSJEkNGbAlSZKkhgzYkiRJUkPz/pccJUm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+i83/ivwvKq6fq77I0nbI6eISNICkWQFsBG4yHAtSXPHEWxJkiSpIUewJUmSpIYM2JIkSVJDBmxJkiSpIQO2JEmS1JABW5IkSWro/wO5e0iDABbUawAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 864x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAs4AAAERCAYAAABrbCFLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAF8xJREFUeJzt3Xu0ZFV9J/Dvj24QFR9oN6ZFsE3UKMsoaPvAJwEhiJloMqOBiUajTi/HZKKzRrNwjVmjUSdqRkeTmIyo+EgMRse3RjEx9lIjGLtVEEQFHEZRlnRUoixjfO3545wrRQ/S+95bfere7s9nrVq37q6q89unHqe+tWvXOdVaCwAAcOMOWnQHAABgPRCcAQCgg+AMAAAdBGcAAOggOAMAQAfBGQAAOqz54FxVZ1fV1VV1Ucd1j66qD1fVp6vqwqo6bYo+AgCw/1vzwTnJ65Oc2nnd5yR5S2vtuCSnJ/mzfdUpAAAOLGs+OLfWPpLkm7NtVfVzVfWBqtpVVR+tqrstXT3JLcfzt0rytQm7CgDAfmzjojuwQmcleWpr7dKqun+GkeUTkzw3yQer6j8luXmShy+uiwAA7E/WXXCuqsOSPDDJW6tqqfkm498zkry+tfbSqjo+yV9U1T1aaz9eQFcBANiPrLvgnGF6yTWttWNv4LInZ5wP3Vo7r6oOTbIpydUT9g8AgP3Qmp/jvKfW2reT/J+qekyS1OBe48VfTnLS2H73JIcm2b2QjgIAsF+p1tqi+3CjquqcJCdkGDn+epL/luTvk/x5ki1JDk7y5tbaH1TVMUleneSwDD8U/L3W2gcX0W8AAPYvaz44AwD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UzfMpqY/vSbnGeMtW6J7ldhifw0u64/iTDyONk9/3M8rZmeXvVmMf63zzDDzSW1v8V6d8d37yee3fMMMpwYYb57UdPff9n2JvD3Rb02n/q2H5hhg8Rt524/jkZ3qw/l/49yjw4w+v2wlz3uj0tww/MPpRh5OZDSW4zXr8y/EDx8gzzubfNLOtJGeZaX5ZhqsLU9T+a4Qea/zLej780Vf0Mo24/yPV3C3bshPVPHpdxwfi364ep87z/Z5b5xPTvVWNe6//AXLeLxs8mefICnn9Lj8Fnk7w+ySET1t6a4cP7/7eHoQnu+w0Zfri3tBu+l01c/9Bct907Px2vuxXW/5kM25VvZ9jt5ZW5bk9ep2XYVl+e5L/2PgY3dHLIbQAA6LDup2oAAMAUBGcAAOggOAMAQAfBGQAAOgjOAADQQXAGAIAOgjPAAaiqNiy6DwDrjeAMsMZV1fOr6ukz/7+wqn63qp5VVZ+sqgur6nkzl7+zqnZV1cU1HNp7qf3aqvqDqvpEhkMwA7AMgjPA2vfajIeYHQ/xfXqSrye5S5L7JTk2yX2q6qHj9Z/UWrtPhqOk/u7S4W4zHL3yotba/VtrH5tyBQD2BxsX3QEAblxr7Yqq+kZVHZfh0PWfTnLfJKeM55PksAxB+iMZwvKvju1Hje3fSPKjJG+bsu8A+xPBGWB9eE2SJyb5mSRnJzkpyR+21l41e6WqOiHJw5Mc31r7blXtSHLoePH3Wms/mqrDAPsbUzUA1od3JDk1w0jzuePpSVV1WJJU1ZFVdUSSWyX51hia75bkAYvqMMD+xogzwDrQWvt+VX04yTXjqPEHq+ruSc6rqiS5NsnjknwgyVOr6sIkX0hy/qL6DLC/qdbaovsAwF6MPwr8VJLHtNYuXXR/AA5EpmoArHFVdUySy5J8SGgGWBwjzgAA0MGIMwAAdBCcAQCgg+AMAAAdBGcAAOggOAMAQIf/B0BMdOGEEYVzAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 864x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAs4AAAERCAYAAABrbCFLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAGC1JREFUeJzt3X2QZWddJ/Dvj0wCQlCCmWCAhEFBIKUSZEAQRQwSeXHFdRdNVvAF3ClWXXFrcSvUYhUuvgCuii+4S5So7GpQRBRFAWVNIZogM0BCQngJbFYilMQXhBQiAr/945wmnTFknu6+c27PzOdT1dW3z335ntt977nffu5zz6nuDgAAcNtut+4VAACAY4HiDAAAAxRnAAAYoDgDAMAAxRkAAAYozgAAMGDXF+equqSqPlRVVw9c9qer6m3z17ur6sNLrCMAAMe/2u37ca6qRya5KclLu/tLtnC9/5jkQd391KO2cgAAnDB2/Yhzd78hyd9tXlZVX1RVr6mqQ1X1p1V1/1u56oVJLl1kJQEAOO7tWfcKbNPFSZ7e3e+pqq9I8gtJzts4s6ruleTeSf7PmtYPAIDjzDFXnKvq1CRfmeTlVbWx+PaHXeyCJL/V3Z9act0AADh+HXPFOdP0kg9397m3cZkLknzvQusDAMAJYNfPcT5cd38kyf+tqiclSU0euHF+Vd0vyWlJLl/TKgIAcBza9cW5qi7NVILvV1U3VNXTknxbkqdV1ZVJrknyxE1XuTDJy3q37y4EAIBjyq7fHR0AAOwGu37EGQAAdoNd++HA008/vfft27fu1QAA4Dh36NChv+nuvUe63K4tzvv27cvBgwfXvRoAABznqur/jVzOVA0AABigOAMAwADFGQAABijOAAAwQHEGAIABijMAAAxQnAEAYIDiDAAAAxRnAAAYsGuPHAgAAEmy76JX7+j61z/vCStZDyPOAAAwQHEGAIABijMAAAxQnAEAYIDiDAAAAxRnAAAYoDgDAMAAxRkAAAYozgAAMEBxBgCAAYozAAAMUJwBAGCA4gwAAAMUZwAAGKA4AwDAgD3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ebn7eMzfcDs9ZlGbl6f5K7z5SvTBxTfm2k+9/5Nt/XUTHOtr8s0VWHp/D/N9AHNf5x/j1+/VH6mUbd/zi13C3bugvmPmW/jyvn70AdTV/n733Sb35nxvWqs6v5/ZW7eRePbkzxtDY+/jb/B25P8SpJTFszel+mf93+xh6EFfvcnZfrg3sZu+H5q4fw75Obt3hUZeN5tM/8LMm1XPpJpt5c35OY9eT0+07b6vUn+6+jf4Na+HHIbAAAGHPNTNQAAYAmKMwAADFCcAQBggOIMAAADFGcAABigOAMAwADFGeAEVFUnrXsdAI41ijPALldVz62qZ2z6+Uer6vur6ger6s1VdVVV/fCm83+nqg5V1TU1Hdp7Y/lNVfXfqupNmQ7BDMAWKM4Au99LMh9idj7E9wVJ/jrJfZM8NMm5SR5cVY+cL//U7n5wpqOkfv/G4W4zHb3y6u7+iu5+45J3AOB4sGfdKwDAbevu66vqb6vqQZkOXf/WJA9Jcv58OklOzVSk35CpLP/reflZ8/K/TfKpJK9Yct0BjieKM8Cx4ZeSfGeSL0hySZJHJ/nx7n7x5gtV1aOSfF2Sh3f3x6rqsiR3mM/+eHd/aqkVBjjemKoBcGx4ZZLHZhppfu389dSqOjVJquoeVXVGks9L8vdzab5/koeta4UBjjdGnAGOAd39iar6kyQfnkeNX1dVD0hyeVUlyU1JnpzkNUmeXlVXJXlXkivWtc4Ax5vq7nWvAwBHMH8o8C1JntTd71n3+gCciEzVANjlquqcJNcleb3SDLA+RpwBAGCAEWcAABigOAMAwADFGQAABijOAAAwQHEGAIAB/x8Ty6SmxJfl6QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 864x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 交通\n",
    "fig, axs = plt.subplots(figsize=(12, 4))   \n",
    "df_bb.groupby(\n",
    "    df_bb[\"year\"])[\"交通\"].mean().plot(kind='bar',\n",
    "                                                          rot=0,\n",
    "                                                          ax=axs)\n",
    "plt.xlabel(\"year\");  # custom x label using matplotlib\n",
    "plt.ylabel(\"$CO_2 $\");\n",
    "\n",
    "# 能源\n",
    "fig, axs = plt.subplots(figsize=(12, 4))   \n",
    "df_bb.groupby(\n",
    "    df_bb[\"year\"])[\"能源\"].mean().plot(kind='bar',\n",
    "                                                          rot=0,\n",
    "                                                          ax=axs)\n",
    "plt.xlabel(\"year\");  # custom x label using matplotlib\n",
    "plt.ylabel(\"$CO_2 $\");\n",
    "\n",
    "# 工业\n",
    "fig, axs = plt.subplots(figsize=(12, 4))   \n",
    "df_bb.groupby(\n",
    "    df_bb[\"year\"])[\"工业\"].mean().plot(kind='bar',\n",
    "                                                          rot=0,\n",
    "                                                          ax=axs)\n",
    "plt.xlabel(\"year\");  # custom x label using matplotlib\n",
    "plt.ylabel(\"$CO_2 $\");"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>国家</th>\n",
       "      <th>Afghanistan</th>\n",
       "      <th>Africa</th>\n",
       "      <th>Albania</th>\n",
       "      <th>Algeria</th>\n",
       "      <th>American Samoa</th>\n",
       "      <th>Americas</th>\n",
       "      <th>Angola</th>\n",
       "      <th>Anguilla</th>\n",
       "      <th>Annex I countries</th>\n",
       "      <th>Antigua and Barbuda</th>\n",
       "      <th>...</th>\n",
       "      <th>Wallis and Futuna</th>\n",
       "      <th>Western Africa</th>\n",
       "      <th>Western Asia</th>\n",
       "      <th>Western Europe</th>\n",
       "      <th>Western Sahara</th>\n",
       "      <th>World</th>\n",
       "      <th>Yemen</th>\n",
       "      <th>Yugoslav SFR</th>\n",
       "      <th>Zambia</th>\n",
       "      <th>Zimbabwe</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1990</th>\n",
       "      <td>607277.0</td>\n",
       "      <td>1.070239e+08</td>\n",
       "      <td>718568.4</td>\n",
       "      <td>11901658.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.846284e+09</td>\n",
       "      <td>1016810.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.070868e+09</td>\n",
       "      <td>50510.7</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>18244238.9</td>\n",
       "      <td>1.420136e+08</td>\n",
       "      <td>3.543644e+08</td>\n",
       "      <td>58833.2</td>\n",
       "      <td>4.020809e+09</td>\n",
       "      <td>4016088.1</td>\n",
       "      <td>14655858.1</td>\n",
       "      <td>776473.1</td>\n",
       "      <td>2100238.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1991</th>\n",
       "      <td>531458.8</td>\n",
       "      <td>1.103102e+08</td>\n",
       "      <td>541824.6</td>\n",
       "      <td>12654625.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.828785e+09</td>\n",
       "      <td>1255872.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.065525e+09</td>\n",
       "      <td>52616.0</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>21341036.2</td>\n",
       "      <td>1.437229e+08</td>\n",
       "      <td>3.636978e+08</td>\n",
       "      <td>52952.7</td>\n",
       "      <td>4.062697e+09</td>\n",
       "      <td>5137189.0</td>\n",
       "      <td>11860254.1</td>\n",
       "      <td>971259.9</td>\n",
       "      <td>1599691.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1992</th>\n",
       "      <td>376129.4</td>\n",
       "      <td>1.165047e+08</td>\n",
       "      <td>416852.4</td>\n",
       "      <td>12758692.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.871173e+09</td>\n",
       "      <td>1188087.2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.070031e+09</td>\n",
       "      <td>54827.5</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>25478699.5</td>\n",
       "      <td>1.599249e+08</td>\n",
       "      <td>3.722845e+08</td>\n",
       "      <td>54297.3</td>\n",
       "      <td>4.133033e+09</td>\n",
       "      <td>5411293.2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>926340.9</td>\n",
       "      <td>2215094.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993</th>\n",
       "      <td>323714.1</td>\n",
       "      <td>1.161578e+08</td>\n",
       "      <td>516002.2</td>\n",
       "      <td>13166005.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.912170e+09</td>\n",
       "      <td>1211474.9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.056496e+09</td>\n",
       "      <td>53266.4</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>22800979.3</td>\n",
       "      <td>1.706407e+08</td>\n",
       "      <td>3.784616e+08</td>\n",
       "      <td>53864.2</td>\n",
       "      <td>4.186769e+09</td>\n",
       "      <td>4411041.8</td>\n",
       "      <td>NaN</td>\n",
       "      <td>659810.6</td>\n",
       "      <td>1971259.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994</th>\n",
       "      <td>310399.8</td>\n",
       "      <td>1.180426e+08</td>\n",
       "      <td>643735.5</td>\n",
       "      <td>12140610.9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.983212e+09</td>\n",
       "      <td>1540101.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.096487e+09</td>\n",
       "      <td>57185.1</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>19819138.8</td>\n",
       "      <td>1.737238e+08</td>\n",
       "      <td>3.782145e+08</td>\n",
       "      <td>51029.2</td>\n",
       "      <td>4.275479e+09</td>\n",
       "      <td>4448347.8</td>\n",
       "      <td>NaN</td>\n",
       "      <td>812779.5</td>\n",
       "      <td>1749812.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 268 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "国家    Afghanistan        Africa   Albania     Algeria  American Samoa  \\\n",
       "year                                                                    \n",
       "1990     607277.0  1.070239e+08  718568.4  11901658.6             NaN   \n",
       "1991     531458.8  1.103102e+08  541824.6  12654625.6             NaN   \n",
       "1992     376129.4  1.165047e+08  416852.4  12758692.5             NaN   \n",
       "1993     323714.1  1.161578e+08  516002.2  13166005.6             NaN   \n",
       "1994     310399.8  1.180426e+08  643735.5  12140610.9             NaN   \n",
       "\n",
       "国家        Americas     Angola  Anguilla  Annex I countries  \\\n",
       "year                                                         \n",
       "1990  1.846284e+09  1016810.5       NaN       3.070868e+09   \n",
       "1991  1.828785e+09  1255872.6       NaN       3.065525e+09   \n",
       "1992  1.871173e+09  1188087.2       NaN       3.070031e+09   \n",
       "1993  1.912170e+09  1211474.9       NaN       3.056496e+09   \n",
       "1994  1.983212e+09  1540101.5       NaN       3.096487e+09   \n",
       "\n",
       "国家    Antigua and Barbuda  ...  Wallis and Futuna  Western Africa  \\\n",
       "year                       ...                                      \n",
       "1990              50510.7  ...                NaN      18244238.9   \n",
       "1991              52616.0  ...                NaN      21341036.2   \n",
       "1992              54827.5  ...                NaN      25478699.5   \n",
       "1993              53266.4  ...                NaN      22800979.3   \n",
       "1994              57185.1  ...                NaN      19819138.8   \n",
       "\n",
       "国家    Western Asia  Western Europe  Western Sahara         World      Yemen  \\\n",
       "year                                                                          \n",
       "1990  1.420136e+08    3.543644e+08         58833.2  4.020809e+09  4016088.1   \n",
       "1991  1.437229e+08    3.636978e+08         52952.7  4.062697e+09  5137189.0   \n",
       "1992  1.599249e+08    3.722845e+08         54297.3  4.133033e+09  5411293.2   \n",
       "1993  1.706407e+08    3.784616e+08         53864.2  4.186769e+09  4411041.8   \n",
       "1994  1.737238e+08    3.782145e+08         51029.2  4.275479e+09  4448347.8   \n",
       "\n",
       "国家    Yugoslav SFR    Zambia   Zimbabwe  \n",
       "year                                     \n",
       "1990    14655858.1  776473.1  2100238.9  \n",
       "1991    11860254.1  971259.9  1599691.5  \n",
       "1992           NaN  926340.9  2215094.8  \n",
       "1993           NaN  659810.6  1971259.8  \n",
       "1994           NaN  812779.5  1749812.5  \n",
       "\n",
       "[5 rows x 268 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "co_2 = df_bb.pivot(index=\"year\", columns=\"国家\", values=\"交通\")\n",
    "co_2.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 再处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pandas.core.groupby.generic.DataFrameGroupBy object at 0x0000024108589DA0>"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_fen = df_main.groupby(['国家',\"年份\"])\n",
    "df_fen"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>交通</th>\n",
       "      <th>能源</th>\n",
       "      <th>工业</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>国家</th>\n",
       "      <th>年份</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Afghanistan</th>\n",
       "      <th>1990</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1991</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1992</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Zimbabwe</th>\n",
       "      <th>2006</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2008</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "      <td>float64</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5440 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                       交通       能源       工业\n",
       "国家          年份                             \n",
       "Afghanistan 1990  float64  float64  float64\n",
       "            1991  float64  float64  float64\n",
       "            1992  float64  float64  float64\n",
       "            1993  float64  float64  float64\n",
       "            1994  float64  float64  float64\n",
       "...                   ...      ...      ...\n",
       "Zimbabwe    2006  float64  float64  float64\n",
       "            2007  float64  float64  float64\n",
       "            2008  float64  float64  float64\n",
       "            2009  float64  float64  float64\n",
       "            2010  float64  float64  float64\n",
       "\n",
       "[5440 rows x 3 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_fen.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>交通</th>\n",
       "      <th>能源</th>\n",
       "      <th>工业</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>国家</th>\n",
       "      <th>年份</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Afghanistan</th>\n",
       "      <th>1990</th>\n",
       "      <td>607277.0</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>118810.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1991</th>\n",
       "      <td>531458.8</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>129749.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1992</th>\n",
       "      <td>376129.4</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>141625.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993</th>\n",
       "      <td>323714.1</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>124728.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994</th>\n",
       "      <td>310399.8</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>147071.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Zimbabwe</th>\n",
       "      <th>2006</th>\n",
       "      <td>1247900.0</td>\n",
       "      <td>7739700.0</td>\n",
       "      <td>628730.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007</th>\n",
       "      <td>1174800.0</td>\n",
       "      <td>7273200.0</td>\n",
       "      <td>541400.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2008</th>\n",
       "      <td>1171700.0</td>\n",
       "      <td>7850200.0</td>\n",
       "      <td>510070.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>1246500.0</td>\n",
       "      <td>8269300.0</td>\n",
       "      <td>478730.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>1354500.0</td>\n",
       "      <td>9019300.0</td>\n",
       "      <td>471890.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5440 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                         交通         能源        工业\n",
       "国家          年份                                  \n",
       "Afghanistan 1990   607277.0   277412.2  118810.1\n",
       "            1991   531458.8   270127.8  129749.1\n",
       "            1992   376129.4   154580.4  141625.6\n",
       "            1993   323714.1   151712.6  124728.0\n",
       "            1994   310399.8   146342.6  147071.6\n",
       "...                     ...        ...       ...\n",
       "Zimbabwe    2006  1247900.0  7739700.0  628730.0\n",
       "            2007  1174800.0  7273200.0  541400.0\n",
       "            2008  1171700.0  7850200.0  510070.0\n",
       "            2009  1246500.0  8269300.0  478730.0\n",
       "            2010  1354500.0  9019300.0  471890.0\n",
       "\n",
       "[5440 rows x 3 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_final = df_fen.mean()\n",
    "df_final"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"8\" halign=\"left\">交通</th>\n",
       "      <th colspan=\"5\" halign=\"left\">能源</th>\n",
       "      <th colspan=\"8\" halign=\"left\">工业</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>...</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>国家</th>\n",
       "      <th>年份</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Afghanistan</th>\n",
       "      <th>1990</th>\n",
       "      <td>1.0</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>607277.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>...</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>277412.2</td>\n",
       "      <td>1.0</td>\n",
       "      <td>118810.1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>118810.1</td>\n",
       "      <td>118810.1</td>\n",
       "      <td>118810.1</td>\n",
       "      <td>118810.1</td>\n",
       "      <td>118810.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1991</th>\n",
       "      <td>1.0</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>NaN</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>531458.8</td>\n",
       "      <td>1.0</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>...</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>270127.8</td>\n",
       "      <td>1.0</td>\n",
       "      <td>129749.1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>129749.1</td>\n",
       "      <td>129749.1</td>\n",
       "      <td>129749.1</td>\n",
       "      <td>129749.1</td>\n",
       "      <td>129749.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1992</th>\n",
       "      <td>1.0</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>NaN</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>376129.4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>...</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>154580.4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>141625.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>141625.6</td>\n",
       "      <td>141625.6</td>\n",
       "      <td>141625.6</td>\n",
       "      <td>141625.6</td>\n",
       "      <td>141625.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993</th>\n",
       "      <td>1.0</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>323714.1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>...</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>151712.6</td>\n",
       "      <td>1.0</td>\n",
       "      <td>124728.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>124728.0</td>\n",
       "      <td>124728.0</td>\n",
       "      <td>124728.0</td>\n",
       "      <td>124728.0</td>\n",
       "      <td>124728.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994</th>\n",
       "      <td>1.0</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>NaN</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>310399.8</td>\n",
       "      <td>1.0</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>...</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>146342.6</td>\n",
       "      <td>1.0</td>\n",
       "      <td>147071.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>147071.6</td>\n",
       "      <td>147071.6</td>\n",
       "      <td>147071.6</td>\n",
       "      <td>147071.6</td>\n",
       "      <td>147071.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Zimbabwe</th>\n",
       "      <th>2006</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>1247900.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>7739700.0</td>\n",
       "      <td>...</td>\n",
       "      <td>7739700.0</td>\n",
       "      <td>7739700.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>628730.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>628730.0</td>\n",
       "      <td>628730.0</td>\n",
       "      <td>628730.0</td>\n",
       "      <td>628730.0</td>\n",
       "      <td>628730.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>1174800.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>7273200.0</td>\n",
       "      <td>...</td>\n",
       "      <td>7273200.0</td>\n",
       "      <td>7273200.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>541400.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>541400.0</td>\n",
       "      <td>541400.0</td>\n",
       "      <td>541400.0</td>\n",
       "      <td>541400.0</td>\n",
       "      <td>541400.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2008</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>1171700.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>7850200.0</td>\n",
       "      <td>...</td>\n",
       "      <td>7850200.0</td>\n",
       "      <td>7850200.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>510070.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>510070.0</td>\n",
       "      <td>510070.0</td>\n",
       "      <td>510070.0</td>\n",
       "      <td>510070.0</td>\n",
       "      <td>510070.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>1246500.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>8269300.0</td>\n",
       "      <td>...</td>\n",
       "      <td>8269300.0</td>\n",
       "      <td>8269300.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>478730.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>478730.0</td>\n",
       "      <td>478730.0</td>\n",
       "      <td>478730.0</td>\n",
       "      <td>478730.0</td>\n",
       "      <td>478730.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>1354500.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>9019300.0</td>\n",
       "      <td>...</td>\n",
       "      <td>9019300.0</td>\n",
       "      <td>9019300.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>471890.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>471890.0</td>\n",
       "      <td>471890.0</td>\n",
       "      <td>471890.0</td>\n",
       "      <td>471890.0</td>\n",
       "      <td>471890.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5440 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                    交通                                                  \\\n",
       "                 count       mean std        min        25%        50%   \n",
       "国家          年份                                                           \n",
       "Afghanistan 1990   1.0   607277.0 NaN   607277.0   607277.0   607277.0   \n",
       "            1991   1.0   531458.8 NaN   531458.8   531458.8   531458.8   \n",
       "            1992   1.0   376129.4 NaN   376129.4   376129.4   376129.4   \n",
       "            1993   1.0   323714.1 NaN   323714.1   323714.1   323714.1   \n",
       "            1994   1.0   310399.8 NaN   310399.8   310399.8   310399.8   \n",
       "...                ...        ...  ..        ...        ...        ...   \n",
       "Zimbabwe    2006   1.0  1247900.0 NaN  1247900.0  1247900.0  1247900.0   \n",
       "            2007   1.0  1174800.0 NaN  1174800.0  1174800.0  1174800.0   \n",
       "            2008   1.0  1171700.0 NaN  1171700.0  1171700.0  1171700.0   \n",
       "            2009   1.0  1246500.0 NaN  1246500.0  1246500.0  1246500.0   \n",
       "            2010   1.0  1354500.0 NaN  1354500.0  1354500.0  1354500.0   \n",
       "\n",
       "                                          能源             ...             \\\n",
       "                        75%        max count       mean  ...        75%   \n",
       "国家          年份                                           ...              \n",
       "Afghanistan 1990   607277.0   607277.0   1.0   277412.2  ...   277412.2   \n",
       "            1991   531458.8   531458.8   1.0   270127.8  ...   270127.8   \n",
       "            1992   376129.4   376129.4   1.0   154580.4  ...   154580.4   \n",
       "            1993   323714.1   323714.1   1.0   151712.6  ...   151712.6   \n",
       "            1994   310399.8   310399.8   1.0   146342.6  ...   146342.6   \n",
       "...                     ...        ...   ...        ...  ...        ...   \n",
       "Zimbabwe    2006  1247900.0  1247900.0   1.0  7739700.0  ...  7739700.0   \n",
       "            2007  1174800.0  1174800.0   1.0  7273200.0  ...  7273200.0   \n",
       "            2008  1171700.0  1171700.0   1.0  7850200.0  ...  7850200.0   \n",
       "            2009  1246500.0  1246500.0   1.0  8269300.0  ...  8269300.0   \n",
       "            2010  1354500.0  1354500.0   1.0  9019300.0  ...  9019300.0   \n",
       "\n",
       "                               工业                                              \\\n",
       "                        max count      mean std       min       25%       50%   \n",
       "国家          年份                                                                  \n",
       "Afghanistan 1990   277412.2   1.0  118810.1 NaN  118810.1  118810.1  118810.1   \n",
       "            1991   270127.8   1.0  129749.1 NaN  129749.1  129749.1  129749.1   \n",
       "            1992   154580.4   1.0  141625.6 NaN  141625.6  141625.6  141625.6   \n",
       "            1993   151712.6   1.0  124728.0 NaN  124728.0  124728.0  124728.0   \n",
       "            1994   146342.6   1.0  147071.6 NaN  147071.6  147071.6  147071.6   \n",
       "...                     ...   ...       ...  ..       ...       ...       ...   \n",
       "Zimbabwe    2006  7739700.0   1.0  628730.0 NaN  628730.0  628730.0  628730.0   \n",
       "            2007  7273200.0   1.0  541400.0 NaN  541400.0  541400.0  541400.0   \n",
       "            2008  7850200.0   1.0  510070.0 NaN  510070.0  510070.0  510070.0   \n",
       "            2009  8269300.0   1.0  478730.0 NaN  478730.0  478730.0  478730.0   \n",
       "            2010  9019300.0   1.0  471890.0 NaN  471890.0  471890.0  471890.0   \n",
       "\n",
       "                                      \n",
       "                       75%       max  \n",
       "国家          年份                        \n",
       "Afghanistan 1990  118810.1  118810.1  \n",
       "            1991  129749.1  129749.1  \n",
       "            1992  141625.6  141625.6  \n",
       "            1993  124728.0  124728.0  \n",
       "            1994  147071.6  147071.6  \n",
       "...                    ...       ...  \n",
       "Zimbabwe    2006  628730.0  628730.0  \n",
       "            2007  541400.0  541400.0  \n",
       "            2008  510070.0  510070.0  \n",
       "            2009  478730.0  478730.0  \n",
       "            2010  471890.0  471890.0  \n",
       "\n",
       "[5440 rows x 24 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_fen.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'CO2变化趋势.html'"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 条形图\n",
    "fig2 = px.bar(df_main, x='国家', y='交通', color='国家', text='交通', \n",
    "             title='世界CO2十年排放变化趋势',\n",
    "             range_y=[300, 25000],\n",
    "             animation_frame='年份',\n",
    "             ) \n",
    "fig2.update_layout(yaxis_title='/年')  # 更新布局配置\n",
    "py.offline.plot(fig2, filename='CO2变化趋势.html')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "307.2px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
